chore: release packages (beta) - #358
Open
btravers wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This Changesets-generated release PR prepares the fixed version group (@temporal-contract/{contract,worker,client,testing}) for publication as 8.0.0-beta.5 while main remains in pre mode.
Changes:
- Bump package versions from
8.0.0-beta.4→8.0.0-beta.5across the release group. - Append
8.0.0-beta.5entries to each package CHANGELOG. - Update
.changeset/pre.jsonto include the changesets consumed by this prerelease.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/worker/package.json | Version bump to 8.0.0-beta.5. |
| packages/worker/CHANGELOG.md | Adds 8.0.0-beta.5 release notes. |
| packages/testing/package.json | Version bump + peer dependency ranges bumped to ^8.0.0-beta.5. |
| packages/testing/CHANGELOG.md | Adds 8.0.0-beta.5 release notes. |
| packages/contract/package.json | Version bump to 8.0.0-beta.5. |
| packages/contract/CHANGELOG.md | Adds 8.0.0-beta.5 release notes. |
| packages/client/package.json | Version bump to 8.0.0-beta.5. |
| packages/client/CHANGELOG.md | Adds 8.0.0-beta.5 release notes. |
| .changeset/pre.json | Records additional changesets included in the current pre-release set. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
mainis currently in pre mode so this branch has prereleases rather than normal releases. If you want to exit prereleases, runchangeset pre exitonmain.Releases
@temporal-contract/client@8.0.0-beta.5
Major Changes
2ddfac3: Family-consistency audit:
TypedWorker.createreplacescreateWorker, andOkAsync/ErrAsyncbecome the canonical pre-lifted constructors.Breaking (worker). The free
createWorkerfunction is removed in favour of a static factory on a newTypedWorkerclass — the worker-side sibling ofTypedClient.createand the org's sharedTyped*.create()shape (matching amqp-contract'sTypedAmqpClient.create/TypedAmqpWorker.create):TypedWorker.create(options)takes the sameCreateWorkerOptionsand returnsAsyncResult<TypedWorker, never>— bundling/connection failures stay technical defects with aTechnicalErrorcause; unwrap with.get().worker.run()returnsAsyncResult<void, never>: a worker that fails while running surfaces as aTechnicalError-caused defect and the underlying promise never rejects (safe to hold across a test without unhandled-rejection guards).await worker.run().get()rethrows at the edge.worker.shutdown()delegates to the raw worker; everything else Temporal's runtime owns (runUntil,getState, …) lives on theworker.rawescape hatch.Migration:
createWorker(opts).get()→TypedWorker.create(opts).get(),await worker.run()→await worker.run().get(),worker.runUntil(...)/worker.getState()→worker.raw.runUntil(...)/worker.raw.getState().Breaking (testing).
createContractTest'sworkerfixture now exposes theTypedWorker(the raw TemporalWorkeris atworker.raw).Docs/idiom sweep (all packages). Pre-lifted async results are now built with
OkAsync(value)/ErrAsync(error)(canonical since unthrown 4.1) instead ofOk(value).toAsync()/Err(error).toAsync()throughout the docs, examples, and TSDoc;.toAsync()remains for lifting an existing syncResult.6d77137: v8 audit remediation — a second full-surface pass hardening robustness, the unthrown integration, developer experience, and btravstack-family consistency before 8.0 stabilises.
All packages.
@temporal-contract/clientand@temporal-contract/workerdrop their CJS output and legacymain/module/typesfields; all four packages verify withattw --profile esm-only.@temporalio/*peer ranges tightened from^1to^1.16.0— the real floor for the Schedule API and the top-level@temporalio/commonsearch-attribute imports.CONTRACT_ERROR_TAG,ACTIVITY_ERROR_TAG,WORKFLOW_FAILED_ERROR_TAG, …) so consumers match withP.tag(CONST)instead of hand-written strings; the classes consume the constants so tag and constant cannot drift.@temporal-contract/contract:Infer*prefix:SignalNamesOf/QueryNamesOf/UpdateNamesOf/DeclaredErrorsOf→InferSignalNames/InferQueryNames/InferUpdateNames/InferDeclaredErrors.defineActivity'sdefaultOptionskey is renamedactivityOptions(merge precedence unchanged), and its typeActivityDefaultOptions→ContractActivityOptions— the new name keeps the contract-level, portable subset distinct from Temporal's ownActivityOptions, which is what the worker-sideactivityOptionsByNameoverrides take.msgrammar atdefineContracttime —"5 minutos","", and negative durations now fail at definition, naming the offending path, instead of at the worker.defineContract: the__temporal_prefix and the exact__stack_trace/__enhanced_stack_tracequery names.workflowsmay be{}when at least one global activity is declared (dedicated activity-pool task queues).details[1] = { $tc: 1 }). Data-less declared errors now require the marker to rehydrate, closing a false positive where anyApplicationFailuresharing a declared error'stypestring was surfaced as the typed domain error. A degrade-to-generic rehydration miss fires the newonRehydrationMissdiagnostic hook instead of failing silently./result-asyncsubpath is removed; the_internal_*helpers move behind a dedicated@temporal-contract/contract/internalsubpath (not a public API).@temporal-contract/worker:handle*convention:context.defineSignal/defineQuery/defineUpdate→context.handleSignal/handleQuery/handleUpdate(no collision with the contract-authoringdefine*helpers or Temporal's own functions).declareWorkflow/declareActivitiesHandlercalls:WorkflowContext,DeclareWorkflowOptions,WorkflowImplementation, the child-workflow handle types, the signal/query/update handler-implementation types,WorkflowInferActivity,DeclareActivitiesHandlerOptions,TypedContinueAsNewOptions, plus the newActivityImplementationFor/GlobalActivityImplementationForhelpers.qualifyFailure(errorType, options)requires anexpecteddiscriminator (an error class, an array of classes, a predicate, or the explicit literal"any"). Causes matchingexpectedare wrapped into the modeledApplicationFailure; everything else — aTypeErrorfrom a bug, say — rides the defect channel instead of being mislabelled a business error. A matched innerApplicationFailurewithnonRetryable: trueis inherited by default.rethrowCancellation(error)helper. When an activity declares anerrorsmap, cancellation surfaces asErr(ActivityCancelledError); generic error handling that folds everyErrto a fallback would complete the workflow instead of cancelling it. The cancellation error classes' JSDoc documents the hazard and the helper.ContractMisuseError) rather than on the first live request.context.continueAsNewcan no longer have its validatedworkflowType/taskQueueoverridden through the options bag.ChildWorkflowErrorcarries a structuredworkflowName; the input/outputValidationErrorsubclasses carry areadonly direction: "input" | "output".TypedWorker.createverifies workflow registration by default — a contract workflow missing from theworkflowsPathbundle, or an export whose name differs from itsworkflowName, fails creation with a contract-aware message. Opt out withverifyWorkflowRegistration: false.@temporal-contract/client:executeWorkflow/handle.result():WorkflowCancelledError,WorkflowTerminatedError,WorkflowTimeoutError(each retaining the originalTemporalFailureascause) — no moreerr.cause instanceof CancelledFailuredigging the matcher can't see.UpdateFailedError,UpdateRejectedError,QueryFailedError(the last covering Temporal'sQueryNotRegisteredError).P-composable tag bundles (WORKFLOW_START_ERROR_TAGS,WORKFLOW_OUTCOME_ERROR_TAGS,WORKFLOW_RESULT_ERROR_TAGS) and atagPatterns(tags)helper collapse the recurring multi-tagmatcharms.handle.rawexposes the underlying@temporalio/clientWorkflowHandle.ContractClientandTypedScheduleClientare no longer constructible directly (usetypedClient.for(...)/ the schedule accessor);ContractClientexposes readonlycontractandtaskQueuegetters.input/signalInput, never identity fields such asworkflowName.TypedScheduleHandle.update()validates the updated action'sargsagainst the contract when itsworkflowTypeis a declared workflow. InvalidDATETIMEsearch-attribute values (new Date(NaN)) are rejected.assertNoDefectthunks are replaced withAsyncResultcombinator chains, so defects flow through channels without manual re-wrapping.@temporal-contract/testing:createContractTest({ contract, workflowsPath, ... })andrunActivity(definition, { implementation, input, env? }).runActivityHandler(definition, { ... })routes through the realdeclareActivitiesHandlerwrapping — input parse, output validation, contract-error wire conversion, and rehydration — so a test exercises what production does, not just the raw implementation.@unthrown/vitestis wired in; the package's assertions usetoBeOk/toBeErrTagged/toBeDefect.testcontainersis now an optional peer dependency, required only forcreateContractTest; the Docker-free/time-skippingand/activityentries no longer pull it in.Patch Changes
@temporal-contract/contract@8.0.0-beta.5
Major Changes
2ddfac3: Family-consistency audit:
TypedWorker.createreplacescreateWorker, andOkAsync/ErrAsyncbecome the canonical pre-lifted constructors.Breaking (worker). The free
createWorkerfunction is removed in favour of a static factory on a newTypedWorkerclass — the worker-side sibling ofTypedClient.createand the org's sharedTyped*.create()shape (matching amqp-contract'sTypedAmqpClient.create/TypedAmqpWorker.create):TypedWorker.create(options)takes the sameCreateWorkerOptionsand returnsAsyncResult<TypedWorker, never>— bundling/connection failures stay technical defects with aTechnicalErrorcause; unwrap with.get().worker.run()returnsAsyncResult<void, never>: a worker that fails while running surfaces as aTechnicalError-caused defect and the underlying promise never rejects (safe to hold across a test without unhandled-rejection guards).await worker.run().get()rethrows at the edge.worker.shutdown()delegates to the raw worker; everything else Temporal's runtime owns (runUntil,getState, …) lives on theworker.rawescape hatch.Migration:
createWorker(opts).get()→TypedWorker.create(opts).get(),await worker.run()→await worker.run().get(),worker.runUntil(...)/worker.getState()→worker.raw.runUntil(...)/worker.raw.getState().Breaking (testing).
createContractTest'sworkerfixture now exposes theTypedWorker(the raw TemporalWorkeris atworker.raw).Docs/idiom sweep (all packages). Pre-lifted async results are now built with
OkAsync(value)/ErrAsync(error)(canonical since unthrown 4.1) instead ofOk(value).toAsync()/Err(error).toAsync()throughout the docs, examples, and TSDoc;.toAsync()remains for lifting an existing syncResult.6d77137: v8 audit remediation — a second full-surface pass hardening robustness, the unthrown integration, developer experience, and btravstack-family consistency before 8.0 stabilises.
All packages.
@temporal-contract/clientand@temporal-contract/workerdrop their CJS output and legacymain/module/typesfields; all four packages verify withattw --profile esm-only.@temporalio/*peer ranges tightened from^1to^1.16.0— the real floor for the Schedule API and the top-level@temporalio/commonsearch-attribute imports.CONTRACT_ERROR_TAG,ACTIVITY_ERROR_TAG,WORKFLOW_FAILED_ERROR_TAG, …) so consumers match withP.tag(CONST)instead of hand-written strings; the classes consume the constants so tag and constant cannot drift.@temporal-contract/contract:Infer*prefix:SignalNamesOf/QueryNamesOf/UpdateNamesOf/DeclaredErrorsOf→InferSignalNames/InferQueryNames/InferUpdateNames/InferDeclaredErrors.defineActivity'sdefaultOptionskey is renamedactivityOptions(merge precedence unchanged), and its typeActivityDefaultOptions→ContractActivityOptions— the new name keeps the contract-level, portable subset distinct from Temporal's ownActivityOptions, which is what the worker-sideactivityOptionsByNameoverrides take.msgrammar atdefineContracttime —"5 minutos","", and negative durations now fail at definition, naming the offending path, instead of at the worker.defineContract: the__temporal_prefix and the exact__stack_trace/__enhanced_stack_tracequery names.workflowsmay be{}when at least one global activity is declared (dedicated activity-pool task queues).details[1] = { $tc: 1 }). Data-less declared errors now require the marker to rehydrate, closing a false positive where anyApplicationFailuresharing a declared error'stypestring was surfaced as the typed domain error. A degrade-to-generic rehydration miss fires the newonRehydrationMissdiagnostic hook instead of failing silently./result-asyncsubpath is removed; the_internal_*helpers move behind a dedicated@temporal-contract/contract/internalsubpath (not a public API).@temporal-contract/worker:handle*convention:context.defineSignal/defineQuery/defineUpdate→context.handleSignal/handleQuery/handleUpdate(no collision with the contract-authoringdefine*helpers or Temporal's own functions).declareWorkflow/declareActivitiesHandlercalls:WorkflowContext,DeclareWorkflowOptions,WorkflowImplementation, the child-workflow handle types, the signal/query/update handler-implementation types,WorkflowInferActivity,DeclareActivitiesHandlerOptions,TypedContinueAsNewOptions, plus the newActivityImplementationFor/GlobalActivityImplementationForhelpers.qualifyFailure(errorType, options)requires anexpecteddiscriminator (an error class, an array of classes, a predicate, or the explicit literal"any"). Causes matchingexpectedare wrapped into the modeledApplicationFailure; everything else — aTypeErrorfrom a bug, say — rides the defect channel instead of being mislabelled a business error. A matched innerApplicationFailurewithnonRetryable: trueis inherited by default.rethrowCancellation(error)helper. When an activity declares anerrorsmap, cancellation surfaces asErr(ActivityCancelledError); generic error handling that folds everyErrto a fallback would complete the workflow instead of cancelling it. The cancellation error classes' JSDoc documents the hazard and the helper.ContractMisuseError) rather than on the first live request.context.continueAsNewcan no longer have its validatedworkflowType/taskQueueoverridden through the options bag.ChildWorkflowErrorcarries a structuredworkflowName; the input/outputValidationErrorsubclasses carry areadonly direction: "input" | "output".TypedWorker.createverifies workflow registration by default — a contract workflow missing from theworkflowsPathbundle, or an export whose name differs from itsworkflowName, fails creation with a contract-aware message. Opt out withverifyWorkflowRegistration: false.@temporal-contract/client:executeWorkflow/handle.result():WorkflowCancelledError,WorkflowTerminatedError,WorkflowTimeoutError(each retaining the originalTemporalFailureascause) — no moreerr.cause instanceof CancelledFailuredigging the matcher can't see.UpdateFailedError,UpdateRejectedError,QueryFailedError(the last covering Temporal'sQueryNotRegisteredError).P-composable tag bundles (WORKFLOW_START_ERROR_TAGS,WORKFLOW_OUTCOME_ERROR_TAGS,WORKFLOW_RESULT_ERROR_TAGS) and atagPatterns(tags)helper collapse the recurring multi-tagmatcharms.handle.rawexposes the underlying@temporalio/clientWorkflowHandle.ContractClientandTypedScheduleClientare no longer constructible directly (usetypedClient.for(...)/ the schedule accessor);ContractClientexposes readonlycontractandtaskQueuegetters.input/signalInput, never identity fields such asworkflowName.TypedScheduleHandle.update()validates the updated action'sargsagainst the contract when itsworkflowTypeis a declared workflow. InvalidDATETIMEsearch-attribute values (new Date(NaN)) are rejected.assertNoDefectthunks are replaced withAsyncResultcombinator chains, so defects flow through channels without manual re-wrapping.@temporal-contract/testing:createContractTest({ contract, workflowsPath, ... })andrunActivity(definition, { implementation, input, env? }).runActivityHandler(definition, { ... })routes through the realdeclareActivitiesHandlerwrapping — input parse, output validation, contract-error wire conversion, and rehydration — so a test exercises what production does, not just the raw implementation.@unthrown/vitestis wired in; the package's assertions usetoBeOk/toBeErrTagged/toBeDefect.testcontainersis now an optional peer dependency, required only forcreateContractTest; the Docker-free/time-skippingand/activityentries no longer pull it in.@temporal-contract/testing@8.0.0-beta.5
Major Changes
2ddfac3: Family-consistency audit:
TypedWorker.createreplacescreateWorker, andOkAsync/ErrAsyncbecome the canonical pre-lifted constructors.Breaking (worker). The free
createWorkerfunction is removed in favour of a static factory on a newTypedWorkerclass — the worker-side sibling ofTypedClient.createand the org's sharedTyped*.create()shape (matching amqp-contract'sTypedAmqpClient.create/TypedAmqpWorker.create):TypedWorker.create(options)takes the sameCreateWorkerOptionsand returnsAsyncResult<TypedWorker, never>— bundling/connection failures stay technical defects with aTechnicalErrorcause; unwrap with.get().worker.run()returnsAsyncResult<void, never>: a worker that fails while running surfaces as aTechnicalError-caused defect and the underlying promise never rejects (safe to hold across a test without unhandled-rejection guards).await worker.run().get()rethrows at the edge.worker.shutdown()delegates to the raw worker; everything else Temporal's runtime owns (runUntil,getState, …) lives on theworker.rawescape hatch.Migration:
createWorker(opts).get()→TypedWorker.create(opts).get(),await worker.run()→await worker.run().get(),worker.runUntil(...)/worker.getState()→worker.raw.runUntil(...)/worker.raw.getState().Breaking (testing).
createContractTest'sworkerfixture now exposes theTypedWorker(the raw TemporalWorkeris atworker.raw).Docs/idiom sweep (all packages). Pre-lifted async results are now built with
OkAsync(value)/ErrAsync(error)(canonical since unthrown 4.1) instead ofOk(value).toAsync()/Err(error).toAsync()throughout the docs, examples, and TSDoc;.toAsync()remains for lifting an existing syncResult.6d77137: v8 audit remediation — a second full-surface pass hardening robustness, the unthrown integration, developer experience, and btravstack-family consistency before 8.0 stabilises.
All packages.
@temporal-contract/clientand@temporal-contract/workerdrop their CJS output and legacymain/module/typesfields; all four packages verify withattw --profile esm-only.@temporalio/*peer ranges tightened from^1to^1.16.0— the real floor for the Schedule API and the top-level@temporalio/commonsearch-attribute imports.CONTRACT_ERROR_TAG,ACTIVITY_ERROR_TAG,WORKFLOW_FAILED_ERROR_TAG, …) so consumers match withP.tag(CONST)instead of hand-written strings; the classes consume the constants so tag and constant cannot drift.@temporal-contract/contract:Infer*prefix:SignalNamesOf/QueryNamesOf/UpdateNamesOf/DeclaredErrorsOf→InferSignalNames/InferQueryNames/InferUpdateNames/InferDeclaredErrors.defineActivity'sdefaultOptionskey is renamedactivityOptions(merge precedence unchanged), and its typeActivityDefaultOptions→ContractActivityOptions— the new name keeps the contract-level, portable subset distinct from Temporal's ownActivityOptions, which is what the worker-sideactivityOptionsByNameoverrides take.msgrammar atdefineContracttime —"5 minutos","", and negative durations now fail at definition, naming the offending path, instead of at the worker.defineContract: the__temporal_prefix and the exact__stack_trace/__enhanced_stack_tracequery names.workflowsmay be{}when at least one global activity is declared (dedicated activity-pool task queues).details[1] = { $tc: 1 }). Data-less declared errors now require the marker to rehydrate, closing a false positive where anyApplicationFailuresharing a declared error'stypestring was surfaced as the typed domain error. A degrade-to-generic rehydration miss fires the newonRehydrationMissdiagnostic hook instead of failing silently./result-asyncsubpath is removed; the_internal_*helpers move behind a dedicated@temporal-contract/contract/internalsubpath (not a public API).@temporal-contract/worker:handle*convention:context.defineSignal/defineQuery/defineUpdate→context.handleSignal/handleQuery/handleUpdate(no collision with the contract-authoringdefine*helpers or Temporal's own functions).declareWorkflow/declareActivitiesHandlercalls:WorkflowContext,DeclareWorkflowOptions,WorkflowImplementation, the child-workflow handle types, the signal/query/update handler-implementation types,WorkflowInferActivity,DeclareActivitiesHandlerOptions,TypedContinueAsNewOptions, plus the newActivityImplementationFor/GlobalActivityImplementationForhelpers.qualifyFailure(errorType, options)requires anexpecteddiscriminator (an error class, an array of classes, a predicate, or the explicit literal"any"). Causes matchingexpectedare wrapped into the modeledApplicationFailure; everything else — aTypeErrorfrom a bug, say — rides the defect channel instead of being mislabelled a business error. A matched innerApplicationFailurewithnonRetryable: trueis inherited by default.rethrowCancellation(error)helper. When an activity declares anerrorsmap, cancellation surfaces asErr(ActivityCancelledError); generic error handling that folds everyErrto a fallback would complete the workflow instead of cancelling it. The cancellation error classes' JSDoc documents the hazard and the helper.ContractMisuseError) rather than on the first live request.context.continueAsNewcan no longer have its validatedworkflowType/taskQueueoverridden through the options bag.ChildWorkflowErrorcarries a structuredworkflowName; the input/outputValidationErrorsubclasses carry areadonly direction: "input" | "output".TypedWorker.createverifies workflow registration by default — a contract workflow missing from theworkflowsPathbundle, or an export whose name differs from itsworkflowName, fails creation with a contract-aware message. Opt out withverifyWorkflowRegistration: false.@temporal-contract/client:executeWorkflow/handle.result():WorkflowCancelledError,WorkflowTerminatedError,WorkflowTimeoutError(each retaining the originalTemporalFailureascause) — no moreerr.cause instanceof CancelledFailuredigging the matcher can't see.UpdateFailedError,UpdateRejectedError,QueryFailedError(the last covering Temporal'sQueryNotRegisteredError).P-composable tag bundles (WORKFLOW_START_ERROR_TAGS,WORKFLOW_OUTCOME_ERROR_TAGS,WORKFLOW_RESULT_ERROR_TAGS) and atagPatterns(tags)helper collapse the recurring multi-tagmatcharms.handle.rawexposes the underlying@temporalio/clientWorkflowHandle.ContractClientandTypedScheduleClientare no longer constructible directly (usetypedClient.for(...)/ the schedule accessor);ContractClientexposes readonlycontractandtaskQueuegetters.input/signalInput, never identity fields such asworkflowName.TypedScheduleHandle.update()validates the updated action'sargsagainst the contract when itsworkflowTypeis a declared workflow. InvalidDATETIMEsearch-attribute values (new Date(NaN)) are rejected.assertNoDefectthunks are replaced withAsyncResultcombinator chains, so defects flow through channels without manual re-wrapping.@temporal-contract/testing:createContractTest({ contract, workflowsPath, ... })andrunActivity(definition, { implementation, input, env? }).runActivityHandler(definition, { ... })routes through the realdeclareActivitiesHandlerwrapping — input parse, output validation, contract-error wire conversion, and rehydration — so a test exercises what production does, not just the raw implementation.@unthrown/vitestis wired in; the package's assertions usetoBeOk/toBeErrTagged/toBeDefect.testcontainersis now an optional peer dependency, required only forcreateContractTest; the Docker-free/time-skippingand/activityentries no longer pull it in.Patch Changes
@temporal-contract/worker@8.0.0-beta.5
Major Changes
2ddfac3: Family-consistency audit:
TypedWorker.createreplacescreateWorker, andOkAsync/ErrAsyncbecome the canonical pre-lifted constructors.Breaking (worker). The free
createWorkerfunction is removed in favour of a static factory on a newTypedWorkerclass — the worker-side sibling ofTypedClient.createand the org's sharedTyped*.create()shape (matching amqp-contract'sTypedAmqpClient.create/TypedAmqpWorker.create):TypedWorker.create(options)takes the sameCreateWorkerOptionsand returnsAsyncResult<TypedWorker, never>— bundling/connection failures stay technical defects with aTechnicalErrorcause; unwrap with.get().worker.run()returnsAsyncResult<void, never>: a worker that fails while running surfaces as aTechnicalError-caused defect and the underlying promise never rejects (safe to hold across a test without unhandled-rejection guards).await worker.run().get()rethrows at the edge.worker.shutdown()delegates to the raw worker; everything else Temporal's runtime owns (runUntil,getState, …) lives on theworker.rawescape hatch.Migration:
createWorker(opts).get()→TypedWorker.create(opts).get(),await worker.run()→await worker.run().get(),worker.runUntil(...)/worker.getState()→worker.raw.runUntil(...)/worker.raw.getState().Breaking (testing).
createContractTest'sworkerfixture now exposes theTypedWorker(the raw TemporalWorkeris atworker.raw).Docs/idiom sweep (all packages). Pre-lifted async results are now built with
OkAsync(value)/ErrAsync(error)(canonical since unthrown 4.1) instead ofOk(value).toAsync()/Err(error).toAsync()throughout the docs, examples, and TSDoc;.toAsync()remains for lifting an existing syncResult.6d77137: v8 audit remediation — a second full-surface pass hardening robustness, the unthrown integration, developer experience, and btravstack-family consistency before 8.0 stabilises.
All packages.
@temporal-contract/clientand@temporal-contract/workerdrop their CJS output and legacymain/module/typesfields; all four packages verify withattw --profile esm-only.@temporalio/*peer ranges tightened from^1to^1.16.0— the real floor for the Schedule API and the top-level@temporalio/commonsearch-attribute imports.CONTRACT_ERROR_TAG,ACTIVITY_ERROR_TAG,WORKFLOW_FAILED_ERROR_TAG, …) so consumers match withP.tag(CONST)instead of hand-written strings; the classes consume the constants so tag and constant cannot drift.@temporal-contract/contract:Infer*prefix:SignalNamesOf/QueryNamesOf/UpdateNamesOf/DeclaredErrorsOf→InferSignalNames/InferQueryNames/InferUpdateNames/InferDeclaredErrors.defineActivity'sdefaultOptionskey is renamedactivityOptions(merge precedence unchanged), and its typeActivityDefaultOptions→ContractActivityOptions— the new name keeps the contract-level, portable subset distinct from Temporal's ownActivityOptions, which is what the worker-sideactivityOptionsByNameoverrides take.msgrammar atdefineContracttime —"5 minutos","", and negative durations now fail at definition, naming the offending path, instead of at the worker.defineContract: the__temporal_prefix and the exact__stack_trace/__enhanced_stack_tracequery names.workflowsmay be{}when at least one global activity is declared (dedicated activity-pool task queues).details[1] = { $tc: 1 }). Data-less declared errors now require the marker to rehydrate, closing a false positive where anyApplicationFailuresharing a declared error'stypestring was surfaced as the typed domain error. A degrade-to-generic rehydration miss fires the newonRehydrationMissdiagnostic hook instead of failing silently./result-asyncsubpath is removed; the_internal_*helpers move behind a dedicated@temporal-contract/contract/internalsubpath (not a public API).@temporal-contract/worker:handle*convention:context.defineSignal/defineQuery/defineUpdate→context.handleSignal/handleQuery/handleUpdate(no collision with the contract-authoringdefine*helpers or Temporal's own functions).declareWorkflow/declareActivitiesHandlercalls:WorkflowContext,DeclareWorkflowOptions,WorkflowImplementation, the child-workflow handle types, the signal/query/update handler-implementation types,WorkflowInferActivity,DeclareActivitiesHandlerOptions,TypedContinueAsNewOptions, plus the newActivityImplementationFor/GlobalActivityImplementationForhelpers.qualifyFailure(errorType, options)requires anexpecteddiscriminator (an error class, an array of classes, a predicate, or the explicit literal"any"). Causes matchingexpectedare wrapped into the modeledApplicationFailure; everything else — aTypeErrorfrom a bug, say — rides the defect channel instead of being mislabelled a business error. A matched innerApplicationFailurewithnonRetryable: trueis inherited by default.rethrowCancellation(error)helper. When an activity declares anerrorsmap, cancellation surfaces asErr(ActivityCancelledError); generic error handling that folds everyErrto a fallback would complete the workflow instead of cancelling it. The cancellation error classes' JSDoc documents the hazard and the helper.ContractMisuseError) rather than on the first live request.context.continueAsNewcan no longer have its validatedworkflowType/taskQueueoverridden through the options bag.ChildWorkflowErrorcarries a structuredworkflowName; the input/outputValidationErrorsubclasses carry areadonly direction: "input" | "output".TypedWorker.createverifies workflow registration by default — a contract workflow missing from theworkflowsPathbundle, or an export whose name differs from itsworkflowName, fails creation with a contract-aware message. Opt out withverifyWorkflowRegistration: false.@temporal-contract/client:executeWorkflow/handle.result():WorkflowCancelledError,WorkflowTerminatedError,WorkflowTimeoutError(each retaining the originalTemporalFailureascause) — no moreerr.cause instanceof CancelledFailuredigging the matcher can't see.UpdateFailedError,UpdateRejectedError,QueryFailedError(the last covering Temporal'sQueryNotRegisteredError).P-composable tag bundles (WORKFLOW_START_ERROR_TAGS,WORKFLOW_OUTCOME_ERROR_TAGS,WORKFLOW_RESULT_ERROR_TAGS) and atagPatterns(tags)helper collapse the recurring multi-tagmatcharms.handle.rawexposes the underlying@temporalio/clientWorkflowHandle.ContractClientandTypedScheduleClientare no longer constructible directly (usetypedClient.for(...)/ the schedule accessor);ContractClientexposes readonlycontractandtaskQueuegetters.input/signalInput, never identity fields such asworkflowName.TypedScheduleHandle.update()validates the updated action'sargsagainst the contract when itsworkflowTypeis a declared workflow. InvalidDATETIMEsearch-attribute values (new Date(NaN)) are rejected.assertNoDefectthunks are replaced withAsyncResultcombinator chains, so defects flow through channels without manual re-wrapping.@temporal-contract/testing:createContractTest({ contract, workflowsPath, ... })andrunActivity(definition, { implementation, input, env? }).runActivityHandler(definition, { ... })routes through the realdeclareActivitiesHandlerwrapping — input parse, output validation, contract-error wire conversion, and rehydration — so a test exercises what production does, not just the raw implementation.@unthrown/vitestis wired in; the package's assertions usetoBeOk/toBeErrTagged/toBeDefect.testcontainersis now an optional peer dependency, required only forcreateContractTest; the Docker-free/time-skippingand/activityentries no longer pull it in.Patch Changes